class Product:
    def __init__(self, product_id, product_name, price, total_quantity, remaining_quantity):
        self.__product_id = product_id
        self.__product_name = product_name
        self.__price = price
        self.__total_quantity = total_quantity
        self.__remaining_quantity = remaining_quantity
    def display(self):
        print(f"id: {self.__product_id}")
        print(f"name: {self.__product_name}")
        print(f"price: {self.__price}")
        print(f"total_quantity: {self.__total_quantity}")
        print(f"remaining_quantity: {self.__remaining_quantity}")
    def income(self):
        return self.__price * (self.__total_quantity - self.__remaining_quantity)
    def setdata(self, product_id, product_name, price, total_quantity, remaining_quantity):
        self.__product_id = product_id
        self.__product_name = product_name
        self.__price = price
        self.__total_quantity = total_quantity
        self.__remaining_quantity = remaining_quantity
product = Product(1001, "phone", 1999.99, 50, 20)
product.display()
print(f"sold: {product.income()}")
product.setdata(1002, "tv", 3999.99, 30, 10)
product.display()
print(f"sold: {product.income()}")